import request from '@/utils/request'

// 一键退回
export function allReturn(rate,workId) {
  return request({
    url: '/biz/work/return/' + rate + '?workId=' + workId,
    method: 'delete',
  })
}

// 查重
export function workReview(query) {
  return request({
    url: '/biz/work/review',
    method: 'post',
    data:query,
  })
}

// 查询作业列表
export function listWork(query) {
  return request({
    url: '/biz/work/list',
    method: 'get',
    params: query
  })
}

// 查询作业详细
export function getWork(id) {
  return request({
    url: '/biz/work/' + id,
    method: 'get'
  })
}

// 新增作业
export function addWork(data) {
  return request({
    url: '/biz/work',
    method: 'post',
    data: data
  })
}

// 修改作业
export function updateWork(data) {
  return request({
    url: '/biz/work',
    method: 'put',
    data: data
  })
}

// 删除作业
export function delWork(id) {
  return request({
    url: '/biz/work/' + id,
    method: 'delete'
  })
}
